Authorization Definition Activation

SoftwareShield System Feature Guide > Authorization Definitions > Authorization Definition Activation

## Authorization Definition Activation

Each Authorization Definition has an "activated" boolean state.

This state can be made true in three different ways, depending on the definition type:

1. Pre-activated (at design time).

2. At run-time programmatically.

3. At run-time with an Activation Code the user inputs (most common).

An Activation Code you generate for a user can not set the activated flag of an Authorization Definition to false once it has already been set to true. There is only one way to set the state of the activated flag to false once it has already been made true:

1. At run-time programmatically.

When a user enters an Activation Code you have given them and the ClientProtector parses it as valid, it "activates" the Authorization definition to which it corresponds. In most cases some process takes place in conjunction with this activation. For example, when a Reset Expire Period Authorization Definition is activated, the expire period is reset. In addition, the state of the activated flag for that definition becomes true.

By default, when you define a new Authorization Definition in the SoftwareShield License Manager, it is not activated (false). However, you have the option of pre-activating it if you wish at design-time. However, doing so does not cause any additional process to take place - it simply starts the definition out with its activated flag set to true.

You can also get and set the value of the activated state of any authorization definition programmatically (except a Deactivate License Authorization Definition which has special properties).

As long as other logic doesn't prevent an Authorization Definition from being activated (Single-Use Activation Code for example) the definition can be activated as many times as is needed. Any process necessary will take place each time it is activated, and the state of the activated flag will remain true after the first activation.

Getting and setting the activated state of an Authorization Definition is particularly useful when using a General Use Authorization Definition for which you are defining your own functionality. This allows you to check if an Activation Code has ever activated it before and if so, conditionally inspect its parameter value for use in further processing.

### More Information

For help on pre-activating Authorization Definitions, see Pre-Activating Authorization Definitions in the SoftwareShield License Manager Reference.

For help on getting the state of the activated flag for an Authorization Definition, see GetAuthorizationDetails in the SoftwareShield ClientProtector Reference.

For help on setting the state of the activated flag for an Authorization Definition, see SetAuthorizationDetails in the SoftwareShield ClientProtector Reference.